import React, { PureComponent } from 'react'

interface IProps {
  name?: string
  age?: number
}
interface IState {
  message: string
}
class Demo02 extends PureComponent<IProps, IState> {
  state = {
    message: 'hello world'
  }
  // constructor(props: IProps) {
  //   super(props)   //这边super(props)是因为类组件默认会进行这部操作
  //   // this.state = {
  //   //   message: 'Hello World'
  //   // }
  // }
  static defaultProps = {
    name: 'sdq'
  }
  render(): React.ReactNode {
    return <div>Demo 2</div>
  }
}

export default Demo02
